package dataMining.apriori3;
/**
 * Date: 13-5-20
 * @author cuih
 * @function Apriori
 */

import java.io.IOException;
import java.util.Date;

public class AprioriFrequentItemset {
    public static boolean[][] DATA = new boolean[8125][120]; //全局数据集的描述
    public static int K = 7;// 最大子集元素个数

    public static int support = 25;// （%）阈值的设置   相对支持度
    public static int sup_absolute = 4495;     //取得绝对支持度

    public static String inputFile = "C:/Users/freedom/Desktop/FI Test/mushroom.dat"; //定义输入数据的文件
    public static String outputFile = "C:/Users/freedom/Desktop/阈值为" + sup_absolute + "的频繁" + K + "项集.txt"; //定义输入数据的文件


    public static void main(String[] args) throws IOException {
        long begin, end, time;
        Date myDate = new Date();
        begin = myDate.getTime();   //对算法进行时间的描述

        //最初将算法表中的内容赋值为false
        for (int i = 0; i < 8125; i++)
            for (int j = 0; j < 120; j++) {
                DATA[i][j] = false; //初始化
            }

        //调用频繁一项集的操作，完成初始化
        Find_frequent_1 findFrequent1 = new Find_frequent_1();
        findFrequent1.find_frequent();

        Date myDate2 = new Date();
        end = myDate2.getTime();
        time = end - begin;
        System.out.println("支持度为" + support + "%的频繁项集挖掘程序运行时间为 " + time + "毫秒");
    }
}